home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ultra Pack
/
UltraComputing Technology Demos and Tools.iso
/
java
/
bin
/
appletviewer
< prev
next >
Wrap
Text File
|
1996-05-03
|
996b
|
58 lines
#!/bin/sh
#
# Determine JAVA_HOME
#
CLASSPATH="$CLASSPATH"
export CLASSPATH
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=`dirname $0`
JAVA_HOME=`cd $JAVA_HOME/.. ; /bin/pwd`
fi
if [ ! -d "$JAVA_HOME" ] ; then
echo "Invalid JAVA_HOME: $JAVA_HOME" 1>&2
exit 1
fi
if [ ! -r "$JAVA_HOME/lib/classes.zip" ] ; then
if [ ! -d "$JAVA_HOME/classes" ] ; then
echo "Invalid JAVA_HOME: $JAVA_HOME" 1>&2
exit 1
fi
fi
if [ ! -r "$JAVA_HOME/lib/appletviewer.properties" ] ; then
echo "Could not read properties file: $JAVA_HOME/lib/appletviewer.properties" 1>&2
exit 1
fi
#
# Create .hotjava directory
#
if [ ! -d "$HOME/.hotjava" ] ; then
echo "Creating $HOME/.hotjava directory"
/usr/bin/mkdir -p $HOME/.hotjava
fi
#
# Parse arguments
#
prog=java
for a in $* ; do
case "$a" in
-debug) prog=jdb ;;
*) args="$args $a" ;;
esac
done
#
# Run the applet viewer
#
eval exec $JAVA_HOME/bin/$prog sun.applet.AppletViewer $args